package com.lzh.others.Thread;

import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Description: 多线程的一种操作方式
 * @Author: LiuZiHao
 * @Date: 2022/7/1 12:25
 */
public class Test {
    public static void main(String[] args) {
//        ExecutorService ex = Executors.newFixedThreadPool(10);
//        CountDownLatch threadSignal = new CountDownLatch(factorInfos.size());
//
//        for (FactorInfo factorInfo : factorInfos) {
//            ex.execute(() -> {
//                //操作
//            });
//        }
//        try {
//            threadSignal.await();
//            ex.shutdown();
//            return Result.<List<Map<String, Object>>>builder().success(true).data(resultMap).build();
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
    }
}
